-- GENERATED SPELL FOR [Sunseeker Researcher] --


function spell0_18421(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(34354,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18421', 12000, 1)
end

function spell1_18421(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(34353,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18421', 8000, 1)
end

function spell2_18421(pUnit, Event) --@Mind Shock,n/a--
pUnit:FullCastSpellOnTarget(34352,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18421', 12000, 1)
end

function spell3_18421(pUnit, Event) --@Poison Shield,Self--
pUnit:FullCastSpellOnTarget(34355,pUnit)
pUnit:RegisterEvent('Sorts_18421', 585, 1)
end

function Sorts_18421(pUnit, Event)
local choix_sorts_18421 = math.random(0, 3)
if choix_sorts_18421 == 0 then
pUnit:RegisterEvent('spell0_18421', 1, 1)
end
if choix_sorts_18421 == 1 then
pUnit:RegisterEvent('spell1_18421', 1, 1)
end
if choix_sorts_18421 == 2 then
pUnit:RegisterEvent('spell2_18421', 1, 1)
end
if choix_sorts_18421 == 3 then
pUnit:RegisterEvent('spell3_18421', 1, 1)
end
end

function mob18421_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18421', math.random(1500, 3000), 1)
end

function mob18421_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18421_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18421_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18421, 1, 'mob18421_Action')
RegisterUnitEvent(18421, 2, 'mob18421_Leave')
RegisterUnitEvent(18421, 3, 'mob18421_Kill')
RegisterUnitEvent(18421, 4, 'mob18421_Die')
